<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>


  <script>

    let arr = [
      { name:'张飞', age:18, sex:'男'},
      { name:'刘备', age:28, sex:'女'},
      { name:'张飞1', age:38, sex:'女'},
      { name:'张飞2', age:48, sex:'男'},
      { name:'张飞3', age:58, sex:'男'},

    ]


    //filter 过滤
    let result = arr.filter(function(person){
      return person.age>30;
    })
    console.log("过滤之后的 arr ");
    console.log(result);





    //  result = arr.map(function(item){
    //    delete item.age;
    //    return item;
    //  })
    //
    //
    //  console.log("arr");
    //  console.log(arr);
    //
    //
    // console.log("result");
    // console.log(result);




  </script>





</head>
<body>

</body>
</html>
